import axios from 'axios'

const http = axios.create({
  baseURL: '',
  withCredentials: true
})

http.interceptors.request.use(config => config)

http.interceptors.response.use(
  response => {
    return response
  },
  error => {
    if (error.response) {
      switch (error.response.status) {
        case 500:
          break
        case 404:
          break
        case 401:
          break
      }
    }
    return Promise.reject(error)
  }
)

export default http
